package com.bw.park.ui.login

import android.content.Intent
import com.bw.park.BR
import com.bw.park.R
import com.bw.park.databinding.ActivityLoginBinding
import com.bw.park.ui.home.MainActivity
import com.mooc.lib_common.mvvm.BaseActivity

class LoginActivity : BaseActivity<LoginViewModel, ActivityLoginBinding>() {

    override fun initView() {
    }

    override fun bindLayout(): Int {
        return R.layout.activity_login
    }

    override fun initData() {
        vm.loginBus.observe(this,{
            var intent = Intent(LoginActivity@this,MainActivity::class.java)
            startActivity(intent)
            finish()
        })
        v.setVariable(BR.vm,vm)
    }
}